3.3.33 \(\int (c (d \sec (e+f x))^p)^n (a+a \sec (e+f x)) \, dx\) [233]

Optimal. Leaf size=156 \[ \frac {a \, _2F_1\left (\frac {1}{2},-\frac {n p}{2};\frac {1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f n p \sqrt {\sin ^2(e+f x)}}-\frac {a \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (1-n p) \sqrt {\sin ^2(e+f x)}} \]

[Out]

a*hypergeom([1/2, -1/2*n*p],[-1/2*n*p+1],cos(f*x+e)^2)*(c*(d*sec(f*x+e))^p)^n*sin(f*x+e)/f/n/p/(sin(f*x+e)^2)^
(1/2)-a*cos(f*x+e)*hypergeom([1/2, -1/2*n*p+1/2],[-1/2*n*p+3/2],cos(f*x+e)^2)*(c*(d*sec(f*x+e))^p)^n*sin(f*x+e
)/f/(-n*p+1)/(sin(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {4033, 3872, 3857, 2722} \begin {gather*} \frac {a \sin (e+f x) \, _2F_1\left (\frac {1}{2},-\frac {n p}{2};\frac {1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{f n p \sqrt {\sin ^2(e+f x)}}-\frac {a \sin (e+f x) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{f (1-n p) \sqrt {\sin ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c*(d*Sec[e + f*x])^p)^n*(a + a*Sec[e + f*x]),x]

[Out]

(a*Hypergeometric2F1[1/2, -1/2*(n*p), (2 - n*p)/2, Cos[e + f*x]^2]*(c*(d*Sec[e + f*x])^p)^n*Sin[e + f*x])/(f*n
*p*Sqrt[Sin[e + f*x]^2]) - (a*Cos[e + f*x]*Hypergeometric2F1[1/2, (1 - n*p)/2, (3 - n*p)/2, Cos[e + f*x]^2]*(c
*(d*Sec[e + f*x])^p)^n*Sin[e + f*x])/(f*(1 - n*p)*Sqrt[Sin[e + f*x]^2])

Rule 2722

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1
)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 3857

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x])^(n - 1)*((Sin[c + d*x]/b)^(n - 1)
*Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 4033

Int[((c_.)*((d_.)*sec[(e_.) + (f_.)*(x_)])^(p_))^(n_)*((a_.) + (b_.)*sec[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol]
 :> Dist[c^IntPart[n]*((c*(d*Sec[e + f*x])^p)^FracPart[n]/(d*Sec[e + f*x])^(p*FracPart[n])), Int[(a + b*Sec[e
+ f*x])^m*(d*Sec[e + f*x])^(n*p), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] &&  !IntegerQ[n]

Rubi steps

\begin {align*} \int \left (c (d \sec (e+f x))^p\right )^n (a+a \sec (e+f x)) \, dx &=\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} (a+a \sec (e+f x)) \, dx\\ &=\left (a (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} \, dx+\frac {\left (a (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{1+n p} \, dx}{d}\\ &=\left (a \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-n p} \, dx+\frac {\left (a \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-1-n p} \, dx}{d}\\ &=\frac {a \, _2F_1\left (\frac {1}{2},-\frac {n p}{2};\frac {1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f n p \sqrt {\sin ^2(e+f x)}}-\frac {a \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{f (1-n p) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.22, size = 124, normalized size = 0.79 \begin {gather*} \frac {a \csc (e+f x) \left ((1+n p) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {n p}{2};1+\frac {n p}{2};\sec ^2(e+f x)\right )+n p \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1+n p);\frac {1}{2} (3+n p);\sec ^2(e+f x)\right )\right ) \left (c (d \sec (e+f x))^p\right )^n \sqrt {-\tan ^2(e+f x)}}{f n p (1+n p)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c*(d*Sec[e + f*x])^p)^n*(a + a*Sec[e + f*x]),x]

[Out]

(a*Csc[e + f*x]*((1 + n*p)*Cos[e + f*x]*Hypergeometric2F1[1/2, (n*p)/2, 1 + (n*p)/2, Sec[e + f*x]^2] + n*p*Hyp
ergeometric2F1[1/2, (1 + n*p)/2, (3 + n*p)/2, Sec[e + f*x]^2])*(c*(d*Sec[e + f*x])^p)^n*Sqrt[-Tan[e + f*x]^2])
/(f*n*p*(1 + n*p))

________________________________________________________________________________________

Maple [F]
time = 0.13, size = 0, normalized size = 0.00 \[\int \left (c \left (d \sec \left (f x +e \right )\right )^{p}\right )^{n} \left (a +a \sec \left (f x +e \right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*sec(f*x+e))^p)^n*(a+a*sec(f*x+e)),x)

[Out]

int((c*(d*sec(f*x+e))^p)^n*(a+a*sec(f*x+e)),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))^p)^n*(a+a*sec(f*x+e)),x, algorithm="maxima")

[Out]

integrate((a*sec(f*x + e) + a)*((d*sec(f*x + e))^p*c)^n, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))^p)^n*(a+a*sec(f*x+e)),x, algorithm="fricas")

[Out]

integral((a*sec(f*x + e) + a)*((d*sec(f*x + e))^p*c)^n, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n}\, dx + \int \left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n} \sec {\left (e + f x \right )}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))**p)**n*(a+a*sec(f*x+e)),x)

[Out]

a*(Integral((c*(d*sec(e + f*x))**p)**n, x) + Integral((c*(d*sec(e + f*x))**p)**n*sec(e + f*x), x))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))^p)^n*(a+a*sec(f*x+e)),x, algorithm="giac")

[Out]

integrate((a*sec(f*x + e) + a)*((d*sec(f*x + e))^p*c)^n, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (c\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^p\right )}^n\,\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d/cos(e + f*x))^p)^n*(a + a/cos(e + f*x)),x)

[Out]

int((c*(d/cos(e + f*x))^p)^n*(a + a/cos(e + f*x)), x)

________________________________________________________________________________________